package com.net;

/**
 * 加入MyThreadRun2已经集成了一个父类，现在就不能在集成Thread类了，
 * 只能采用实现Runnable接口的方式
 */
public class MyThreadRun2  {
  public static void main(String[] args) {
    Thread thread = new Thread(new MyRunnable());
    thread.start();
    System.out.println("运行结束");
  }
}

class MyRunnable implements Runnable {
  @Override
  public void run() {
    System.out.println("线程运行中！");
  }
}
